# -*- coding: utf-8 -*-
from flask import render_template
from flask_restful import Resource

from tank import api
from tank.contribs.admin import bp
from tank.contribs.admin.core import root_menu


@bp.route("/")
def home():
    return render_template("admin.html")


@api.resource('/admin/action',
              '/admin/action/<string:action>')
class AdminTableResource(Resource):
    def get(self, action=None):
        pass


@api.resource('/admin/menu',
              '/admin/menu/<string:menu>')
class AdminMenuResource(Resource):
    def get(self, menu=None):
        return root_menu.get_by_path(menu).render()
